home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / othergnu / gnuplot.zoo / atari.diff next >
Text File  |  1992-07-03  |  26KB  |  1,058 lines

  1. diff -crbB gnuplot.org\command.c d:\tc2\gnu\gnuplot\command.c
  2. *** gnuplot.org\command.c    Sat Feb 15 17:12:08 1992
  3. --- d:\tc2\gnu\gnuplot\command.c    Thu Feb 13 00:51:12 1992
  4. ***************
  5. *** 2871,2876 ****
  6. --- 2871,2879 ----
  7.   #ifdef AMIGA_AC_5
  8.   char strg0[256];
  9.   #endif
  10. + #if defined(ATARI)&&defined(__GNUC__)
  11. + #include <osbind.h>
  12. + #endif
  13.   
  14.   do_system()
  15.   {
  16. ***************
  17. *** 2881,2887 ****
  18. --- 2884,2903 ----
  19.      getparms(input_line+1,parms);
  20.      if(fexecv(parms[0],parms) < 0)
  21.   #else
  22. + #if defined(ATARI)&&defined(__GNUC__)
  23. +    /* use preloaded shell, if available */
  24. +    short (*shell_p)(char *command);
  25. +    void *ssp;
  26. +    ssp=(void*)Super(NULL);
  27. +    shell_p=*(short(**)(char*))0x4f6;
  28. +    Super(ssp);
  29. +    /* this is a bit strange, but we have to have a single if */
  30. +    if( (shell_p ? (*shell_p)(input_line+1) : system(input_line+1) ) )
  31. + #else
  32.      if (system(input_line + 1))
  33. + #endif
  34.   #endif
  35.         os_error("system() failed",NO_CARET);
  36.   }
  37. diff -crbB gnuplot.org\demo\simple.dem d:\tc2\gnu\gnuplot\demo\simple.dem
  38. *** gnuplot.org\demo\simple.dem    Tue Feb 11 23:19:22 1992
  39. --- d:\tc2\gnu\gnuplot\demo\simple.dem    Fri Feb 28 13:21:58 1992
  40. ***************
  41. *** 31,37 ****
  42.   plot [-30:20] sin(x*20)*atan(x)
  43.   pause -1 "Hit return to continue"
  44.   
  45. ! plot [-19:19] '1.dat'with impulses ,'2.dat' ,'3.dat' with lines
  46.   pause -1 "Hit return to continue"
  47.   
  48.   # undo what we have done above
  49. --- 31,37 ----
  50.   plot [-30:20] sin(x*20)*atan(x)
  51.   pause -1 "Hit return to continue"
  52.   
  53. ! plot [-19:19] '1.dat' with impulses ,'2.dat' ,'3.dat' with lines
  54.   pause -1 "Hit return to continue"
  55.   
  56.   # undo what we have done above
  57. diff -crbB gnuplot.org\internal.c d:\tc2\gnu\gnuplot\internal.c
  58. *** gnuplot.org\internal.c    Sat Feb 15 17:12:28 1992
  59. --- d:\tc2\gnu\gnuplot\internal.c    Sun Feb 09 17:01:00 1992
  60. ***************
  61. *** 66,77 ****
  62.   #ifdef apollo
  63.   int matherr(struct exception *x)    /* apollo */
  64.   #else /* apollo */
  65. ! #ifdef AMIGA_LC_5_1
  66.   int matherr(x)    /* AMIGA_LC_5_1 */
  67.   struct exception *x;
  68.   #else    /* Most everyone else (not apollo). */
  69.   int matherr()
  70. ! #endif /* AMIGA_LC_5_1 */
  71.   #endif /* apollo */
  72.   #endif /* MSDOS */
  73.   {
  74. --- 66,77 ----
  75.   #ifdef apollo
  76.   int matherr(struct exception *x)    /* apollo */
  77.   #else /* apollo */
  78. ! #if defined(AMIGA_LC_5_1)||defined(ATARI)&&defined(__GNUC__)
  79.   int matherr(x)    /* AMIGA_LC_5_1 */
  80.   struct exception *x;
  81.   #else    /* Most everyone else (not apollo). */
  82.   int matherr()
  83. ! #endif /* AMIGA_LC_5_1 || GCC_ST */
  84.   #endif /* apollo */
  85.   #endif /* MSDOS */
  86.   {
  87. diff -crbB gnuplot.org\plot.c d:\tc2\gnu\gnuplot\plot.c
  88. *** gnuplot.org\plot.c    Sat Feb 15 17:12:36 1992
  89. --- d:\tc2\gnu\gnuplot\plot.c    Sun Mar 08 17:54:16 1992
  90. ***************
  91. *** 57,62 ****
  92. --- 57,66 ----
  93.   #include <graphics.h>
  94.   #endif
  95.   
  96. + #if defined(__GNUC__)&&defined(ATARI)
  97. + #include <osbind.h>
  98. + #endif
  99.   extern char *getenv(),*strcat(),*strcpy(),*strncpy();
  100.   
  101.   extern char input_line[];
  102. ***************
  103. *** 134,165 ****
  104.   #define HOME "sys$login:"
  105.   
  106.   #else /* vms */
  107. ! #ifdef MSDOS
  108.   
  109.   #define HOME "GNUPLOT"
  110.   
  111. ! #else /* MSDOS */
  112. ! #if defined(AMIGA_AC_5) || defined(AMIGA_LC_5_1)
  113. ! #define HOME "GNUPLOT"
  114. ! #else /* AMIGA */
  115.   
  116.   #define HOME "HOME"
  117.   
  118. ! #endif /* AMIGA */
  119. ! #endif /* MSDOS */
  120.   #endif /* vms */
  121.   
  122. ! #ifdef unix
  123. ! #define PLOTRC ".gnuplot"
  124. ! #else /* unix */
  125. ! #if defined(AMIGA_AC_5) || defined(AMIGA_LC_5_1)
  126.   #define PLOTRC ".gnuplot"
  127. ! #else /* AMIGA */
  128.   #define PLOTRC "gnuplot.ini"
  129. ! #endif /* AMIGA */
  130. ! #endif /* unix */
  131.   
  132.   #ifdef __TURBOC__
  133.   void tc_interrupt()
  134. --- 138,159 ----
  135.   #define HOME "sys$login:"
  136.   
  137.   #else /* vms */
  138. ! #if defined(MSDOS) ||  defined(AMIGA_AC_5) || defined(AMIGA_LC_5_1) || defined(ATARI)
  139.   
  140.   #define HOME "GNUPLOT"
  141.   
  142. ! #else /* MSDOS || AMIGA || ATARI */
  143.   
  144.   #define HOME "HOME"
  145.   
  146. ! #endif /* MSDOS || AMIGA || ATARI */
  147.   #endif /* vms */
  148.   
  149. ! #if defined(unix) || defined(AMIGA_AC_5) || defined(AMIGA_LC_5_1)
  150.   #define PLOTRC ".gnuplot"
  151. ! #else /* AMIGA || unix */
  152.   #define PLOTRC "gnuplot.ini"
  153. ! #endif /* AMIGA || unix */
  154.   
  155.   #ifdef __TURBOC__
  156.   void tc_interrupt()
  157. ***************
  158. *** 297,302 ****
  159. --- 321,330 ----
  160.                   (void) signal(SIGINT, ss_interrupt);
  161.   #endif
  162.   #else /* MSDOS */
  163. + #if defined(__GNUC__)&&defined(ATARI)
  164. +         /* clear keybd buffer - strange GCC bug with signal(SIGINT) */
  165. +                 while( Cconis() ) Cnecin();
  166. + #endif /* GNUC && ATARI */
  167.                   (void) signal(SIGINT, inter);   /* go there on interrupt char */
  168.   #endif /* MSDOS */
  169.   }
  170. ***************
  171. *** 313,320 ****
  172.   #ifdef vms
  173.       (void) strcpy(home,HOME);
  174.   #else /* vms */
  175.   #if defined(AMIGA_AC_5) || defined(AMIGA_LC_5_1)
  176. -     strcpy(home,getenv(HOME));
  177.       {
  178.           int h;
  179.           h = strlen(home) - 1;
  180. --- 341,356 ----
  181.   #ifdef vms
  182.       (void) strcpy(home,HOME);
  183.   #else /* vms */
  184. + #if !defined(AMIGA_AC_5)&&!defined(AMIGA_LC_5_1)&&!defined(MSDOS)&&!defined(ATARI)
  185. +     (void) strcat(strcpy(home,getenv(HOME)),"/");
  186. + #else 
  187. +     char *tmp_home=getenv(HOME);
  188. +     if( !tmp_home ) {
  189. +         home[0]='\0';
  190. +     } else {
  191. +         strcpy(home,tmp_home);
  192.   #if defined(AMIGA_AC_5) || defined(AMIGA_LC_5_1)
  193.           {
  194.               int h;
  195.               h = strlen(home) - 1;
  196. ***************
  197. *** 326,334 ****
  198.              }
  199.       }
  200.   #else /* AMIGA */
  201. !     (void) strcat(strcpy(home,getenv(HOME)),"/");
  202.   #endif /* AMIGA */
  203.   #endif /* vms */
  204.   #ifdef NOCWDRC
  205.       /* inhibit check of init file in current directory for security reasons */
  206.       {
  207. --- 362,374 ----
  208.               }
  209.           }
  210.   #else /* AMIGA */
  211. !         if( strlen(home) && home[strlen(home)-1]!='\\' )
  212. !             strcat(home,"\\");
  213.   #endif /* AMIGA */
  214. +     }
  215. + #endif /* !AMIGA && !MSDOS && !ATARI */
  216.   #endif /* vms */
  217.   #ifdef NOCWDRC
  218.       /* inhibit check of init file in current directory for security reasons */
  219.       {
  220. diff -crbB gnuplot.org\plot.h d:\tc2\gnu\gnuplot\plot.h
  221. *** gnuplot.org\plot.h    Sat Feb 15 17:12:46 1992
  222. --- d:\tc2\gnu\gnuplot\plot.h    Mon Feb 10 23:07:40 1992
  223. ***************
  224. *** 39,45 ****
  225. --- 39,49 ----
  226.   #if defined(AMIGA_LC_5_1) || defined(AMIGA_AC_5)
  227.   #define SHELL "NewShell"
  228.   #else /* AMIGA */
  229. + #ifdef ATARI
  230. + #define SHELL "gulam.prg"
  231. + #else /* ATARI */
  232.   #define SHELL "/bin/sh"        /* used if SHELL env variable not set */
  233. + #endif /* ATARI */
  234.   #endif /* AMIGA  */
  235.   
  236.   #define SAMPLES 100        /* default number of samples for a plot */
  237. ***************
  238. *** 111,116 ****
  239. --- 115,124 ----
  240.   #endif
  241.   
  242.   
  243. + #ifdef ATARI
  244. + #define OS "TOS "
  245. + #endif
  246.   #ifndef OS
  247.   #define OS ""
  248.   #endif
  249. ***************
  250. *** 260,268 ****
  251. --- 268,278 ----
  252.       LEFT, CENTRE, RIGHT
  253.   };
  254.   
  255. + #if !(defined(ATARI)&&defined(__GNUC__)&&defined(_MATH_H)) /* FF's math.h has the type already */
  256.   struct cmplx {
  257.       double real, imag;
  258.   };
  259. + #endif
  260.   
  261.   
  262.   struct value {
  263. diff -crbB gnuplot.org\readline.c d:\tc2\gnu\gnuplot\readline.c
  264. *** gnuplot.org\readline.c    Sat Feb 15 17:12:54 1992
  265. --- d:\tc2\gnu\gnuplot\readline.c    Sun Feb 09 21:41:44 1992
  266. ***************
  267. *** 69,75 ****
  268.   #endif
  269.   
  270.   
  271. ! #ifndef MSDOS
  272.   
  273.   /* UNIX specific stuff */
  274.   #ifdef TERMIOS
  275. --- 69,75 ----
  276.   #endif
  277.   
  278.   
  279. ! #if !defined(MSDOS)&&!defined(ATARI)
  280.   
  281.   /* UNIX specific stuff */
  282.   #ifdef TERMIOS
  283. ***************
  284. *** 81,95 ****
  285.   #endif /* TERMIOS */
  286.   static int term_set = 0;    /* =1 if rl_termio set */
  287.   
  288. ! #else
  289.   /* MSDOS specific stuff */
  290.   #define getc(stdin) msdos_getch()
  291.   static char msdos_getch();
  292.   #endif /* MSDOS */
  293.   
  294.   /* is it <string.h> or <strings.h>?   just declare what we need */
  295.   extern int strlen();
  296.   extern char *strcpy();
  297. --- 81,101 ----
  298.   #endif /* TERMIOS */
  299.   static int term_set = 0;    /* =1 if rl_termio set */
  300.   
  301. ! #else /* !MSDOS && !ATARI */
  302. ! #ifdef MSDOS
  303.   /* MSDOS specific stuff */
  304.   #define getc(stdin) msdos_getch()
  305.   static char msdos_getch();
  306. ! #else /* MSDOS */
  307. ! /* ATARI then */
  308. ! #ifdef getc
  309. ! #unde